package com.zx.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zx.dao.IVideoMoveDAO;
import com.zx.model.VideoMove;
@RestController
@RequestMapping("/move")
public class VideoMoveController {

	@Resource
	private IVideoMoveDAO moveDAO;
	@RequestMapping("/findAll.do")
	public Map findAll(VideoMove m) {
		m.setPage((m.getPage()-1)*m.getLimit());
		List<VideoMove> list = moveDAO.findAll(m);
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("code", 0);
		map.put("msg", "查询成功");
		map.put("count", moveDAO.getCount(m));
		map.put("data", moveDAO.findAll(m));
		return map;
	}
	
	@RequestMapping("/edit.do")
	public int edit(VideoMove m) {
		return moveDAO.edit(m);
	}
}
